<template>
  <div>
    测试页面
     <el-table :data="lists" border  style="width:auto" :tree-props="{children: 'cell'}">
    <el-table-column prop="text" align="center" label="姓名">

    </el-table-column>
    <el-table-column prop="state" align="center" label="状态">
       <!-- <el-checkbox-group  >
            <el-checkbox label="state" :true-label="state==true"/>
          </el-checkbox-group> -->
    </el-table-column>


  </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      lists:[],
      tableList: [
        {
          cell1: { text: "李四1", state: true },
          cell2: { text: "李四4", state: true },
          cell3: { text: "李四13", state: true },
        },
        {
          cell: { text: "李四1", state: true },
          cell2: { text: "李四2", state: true },
          cell3: { text: "李四13", state: false },
        },
        {
          cell: { text: "王五7", state: true },
          cell2: { text: "李四2", state: true },
          cell3: { text: "李四9", state: false },
        },
      ],
    };
  },
  created(){

    // 方法一
    let list = this.lists
    this.tableList.forEach(item=>{
      for (const key in item) {
 list.push(item[key])
      }
      // return list
    })
    // 方法二
    //  this.tableList.forEach(item=>{
// list.push(Object.values(item))

//     })
  },
  methods:{

  }
};
</script>
